package lol.clann.minecraft.springboot.plugin.core.ddl;

import lol.clann.minecraft.springboot.api.spi.ddl.DDL;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class SbpDDL0 implements DDL {
    @Override
    public int getVersion() {
        return 0;
    }

    @Override
    public List<String> getSqls() {
        List<String> sqls = new ArrayList<>();
        sqls.add("create table `sbp_plugin_ddl` (\n" +
                "  `id`      bigint(20) unsigned not null auto_increment,\n" +
                "  `plugin`  varchar(65)         not null\n" +
                "  comment '插件iD',\n" +
                "  `version` int(32)             not null\n" +
                "  comment '当前ddl版本号',\n" +
                "  primary key (`id`),\n" +
                "  key `sbp_plugin_ddl_idx_plugin` (`plugin`)\n" +
                ")");
        return sqls;
    }
}
